MaoliWindow = function(){
	
	
	var grid = new Ext.grid.GridPanel({
		loadMask : true,
		border : false,
		columns : [{
			header : "毛利贡献率",
			dataIndex : "maoli",
			align : "center"
		},{
			xtype : "numbercolumn",
			header : "提成比例",
			dataIndex : "proportion",
			align : "center",
			renderer : percentageRender
		}],
		store : new Ext.data.JsonStore({
			url : "maoli/findAll.action",
			fields : ["maoli","proportion"]
		}),
		 viewConfig: {
		    forceFit: true
		 }
	});
	
	
	MaoliWindow.superclass.constructor.call(this, {
		title : "毛利贡献率对照表",
		width : 300,
		height : 500,
		layout : "fit",
		closeAction : "hide",
		items : [grid],
		listeners : {
			show : function(){
				grid.store.reload();
			}
		},
		bbar : ["注: 毛利贡献率=（收入-成本-超支费用）/ 成本"]
	});
};
Ext.extend(MaoliWindow, Ext.Window);
var maoliWindow = new MaoliWindow();